]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-shadow: Add a CoglFramebuffer argument
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Oct 2018 01:33:19 +0000 (22:33 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 28 Jan 2019 14:35:54 +0000 (12:35 -0200)
The last patch in the series, this one adapts StShadowHelper
to received a CoglFramebuffer. This is where we first touch
JavaScript with Cogl types, and as such, it depends on the
latest Mutter. Earlier versions of Mutter didn't have its
Mutter-Clutter GIR to generate types for various Cogl types.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/283

js/ui/screenShield.js
src/st/st-shadow.c
src/st/st-shadow.h

index f5ba1c29985d8d416e53b0527c03e3af6a3a2951..5e9eae2e2c663185df577202c3b15934776e3b66 100644 (file)
@@ -2,6 +2,7 @@
 
 const AccountsService = imports.gi.AccountsService;
 const Cairo = imports.cairo;
+const Cogl = imports.gi.Cogl;
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
@@ -405,7 +406,9 @@ class ScreenShieldArrow extends St.Bin {
 
             let allocation = this._drawingArea.get_allocation_box();
             let paintOpacity = this._drawingArea.get_paint_opacity();
-            this._shadowHelper.paint(allocation, paintOpacity);
+            let framebuffer = Cogl.get_draw_framebuffer();
+
+            this._shadowHelper.paint(framebuffer, allocation, paintOpacity);
         }
 
         this._drawingArea.paint();
index 02824002264df406c89656a7db31bab1b3b88494..f3a22f03463506ce6aa0e7fd16ab64a984aba7cf 100644 (file)
@@ -276,6 +276,7 @@ st_shadow_helper_free (StShadowHelper *helper)
 /**
  * st_shadow_helper_paint:
  * @helper: a #StShadowHelper
+ * @framebuffer: a #CoglFramebuffer
  * @actor_box: the bounding box of the shadow
  * @paint_opacity: the opacity at which the shadow is painted
  *
@@ -284,11 +285,12 @@ st_shadow_helper_free (StShadowHelper *helper)
  */
 void
 st_shadow_helper_paint (StShadowHelper  *helper,
+                        CoglFramebuffer *framebuffer,
                         ClutterActorBox *actor_box,
                         guint8           paint_opacity)
 {
   _st_paint_shadow_with_opacity (helper->shadow,
-                                 cogl_get_draw_framebuffer (),
+                                 framebuffer,
                                  helper->pipeline,
                                  actor_box,
                                  paint_opacity);
index 40c214958428e29a39ba26053bbc3386bdc710b8..8173f34f48865dbe1b869393b27f5b5e9e980083 100644 (file)
@@ -84,6 +84,7 @@ void            st_shadow_helper_update (StShadowHelper *helper,
                                          ClutterActor   *source);
 
 void            st_shadow_helper_paint (StShadowHelper  *helper,
+                                        CoglFramebuffer *framebuffer,
                                         ClutterActorBox *actor_box,
                                         guint8           paint_opacity);